package org.example;

import java.nio.channels.Channel;
import java.nio.channels.SocketChannel;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

public class ChannelContext {
    private static ConcurrentMap<Integer, SocketChannel> channelMap = new ConcurrentHashMap<>();

    public static void push(int port,SocketChannel channel){
        channelMap.put(port,channel);
    }

    public static SocketChannel get(int port){
        return channelMap.get(port);
    }

}
